/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.f1x.api.message.fields;

// Generated by org.f1x.tools.DictionaryGenerator from QuickFIX dictionary
public enum PaymentMethod implements org.f1x.api.message.types.IntEnum {
	CREST(1),
	NSCC(2),
	EUROCLEAR(3),
	CLEARSTREAM(4),
	CHEQUE(5),
	TELEGRAPHIC_TRANSFER(6),
	FEDWIRE(7),
	DEBIT_CARD(8),
	DIRECT_DEBIT(9),
	DIRECT_CREDIT(10),
	CREDIT_CARD(11),
	ACH_DEBIT(12),
	ACH_CREDIT(13),
	BPAY(14),
	HIGH_VALUE_CLEARING_SYSTEM(15);

	private final int code;

	PaymentMethod (int code) {
		this.code  = code;
	}

	public int getCode() { return code; }

	public static PaymentMethod parse(String s) {
		switch(s) {
			case "1" : return CREST;
			case "2" : return NSCC;
			case "3" : return EUROCLEAR;
			case "4" : return CLEARSTREAM;
			case "5" : return CHEQUE;
			case "6" : return TELEGRAPHIC_TRANSFER;
			case "7" : return FEDWIRE;
			case "8" : return DEBIT_CARD;
			case "9" : return DIRECT_DEBIT;
			case "10" : return DIRECT_CREDIT;
			case "11" : return CREDIT_CARD;
			case "12" : return ACH_DEBIT;
			case "13" : return ACH_CREDIT;
			case "14" : return BPAY;
			case "15" : return HIGH_VALUE_CLEARING_SYSTEM;
		}
		return null;
	}

}